package com.itheima.a01mymap;

import java.util.HashMap;
import java.util.Map;

public class A01_MapDemo1 {
    public static void main(String[] args) {
        //1.创建Map集合的对象
        Map<String,String> m=new HashMap<>();

        //2.添加元素
        m.put("郭靖","黄蓉");
        m.put("韦小宝","沐剑屏");
        m.put("尹志平","小龙女");
        String value=m.put("韦小宝","双儿");
        System.out.println(value);
        //3.打印集合
        System.out.println(m);

        boolean result=m.containsKey("郭靖");
        System.out.println(result);
    }
}
